package com.example.service.impl;

import com.example.domain.ZoneDevice;
import com.example.mapper.ZoneDeviceMapper;
import com.example.service.ZoneDeviceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ZoneDeviceServiceImpl implements ZoneDeviceService {

    @Autowired
    private ZoneDeviceMapper zoneDeviceMapper;

    @Override
    public List<ZoneDevice> getAll() {
        return zoneDeviceMapper.getAll();
    }

    @Override
    public ZoneDevice getById(Integer zoneId) {
        return zoneDeviceMapper.getById(zoneId);
    }

    @Override
    public boolean add(ZoneDevice zoneDevice) {
        return zoneDeviceMapper.add(zoneDevice);
    }

    @Override
    public boolean update(ZoneDevice zoneDevice) {
        return zoneDeviceMapper.update(zoneDevice);
    }

    @Override
    public boolean delete(Integer zoneId) {
        return zoneDeviceMapper.delete(zoneId);
    }
}
